---
output:
  pdf_document: default
  html_document: default
---

# Replication Package for: The Church as Arbiter 
## February 2025

This replication package accompanies Boix and Lacroix. (forthcoming). "The Church as Arbiter". Journal of Politics.


## Authors
Boix Carles, Princeton University.
Lacroix Jean, Université Paris Saclay.

# Data availability and provenance statements
### Statement about rights

The author(s) of the manuscript have legitimate access to and permission to use the data used in this manuscript.

### Summary of availability
- All data **are** publicly available.

### Details on each data source
All raw data are stored in the folder `Data/Original`. 
The sources of this data are described in Online Appendix D.

#### Shapefiles:  

- "Maps/Shapefiles/DEPARTEMENTS_1919.shp" is a shapefile of US counties (Source: Gay, V., 2021).

#### Original data from this study
- `Commune.dta` is the dataset at the Commune-level. 
- `Canton.dta` is the dataset at the Cantonal-level. 
- `Diocese.dta` is the dataset at the Diocese-level.
- `Departement.dta` is the dataset at the Departement-level.

#### For Map Construction
- `Maps/Shapefiles/Branches.shp` is a shapefile of French communes centroids with a variable indicating whether a commune had branches both before and after 1926.
- `Maps/Shapefiles/Branches_PermanencePost.csv`is a text file with French communes centroids and a variable indicating whether a commune had branches after 1926.
- `Maps/Shapefiles/Branches_PermanencePre.csv` is a text file with French communes centroids and a variable indicating whether a commune had branches before 1926.
- `Maps/Shapefiles/Branches_PermanencePre.csv` is a text file with French communes centroids and variables indicating the number of AF meetings in 1925, 1926, 1927 and 1928.

# Dataset list
All these originals datasets appear in the folder `Data/original`.

| Data file                         | Source | Notes    |Provided |
|-----------------------------------|--------|----------|---------|
|`Commune.dta` | Authors | As per terms of use | Yes |
|`Canton.dta` | Authors  | As per terms of use | Yes |
|`Diocese.dta`| Authors | As per terms of use | Yes |
|`Departement.dta`| Authors | As per terms of use | Yes |
|`Maps/Shapefiles/DEPARTEMENTS_1919.shp`                 | Gay V. (2021) | As per terms of use | Yes |
|`Maps/Shapefiles/Branches.shp`| Authors | As per terms of use | Yes |
|`Maps/Shapefiles/Branches_PermanencePost.csv`| Authors | As per terms of use | Yes |
|`Maps/Shapefiles/Branches_PermanencePre.csv`| Authors | As per terms of use | Yes |


# Computational requirements

### Software requirements
- Stata (code was last run with version 18)
  
- QGIS 3.36 Maidenhead.


### Memory and runtime requirements
#### Summary

Approximate time needed to reproduce the analyses on a standard desktop machine: 20 min.

#### Details
The code was last run on a HP Elitebook x360 1030 G8 Notebook with 11th Gen Intel(R) Core(TM) i7-1185G7, running Windows 11 Professional.

# Description of programs/code
All codes are in the `Code` folder. Codes are organized in two subfolders: `Preparation` and `Results`. A `Master` dofile runs first the `Preparation` dofiles and then the `Results` dofiles. 

The folder Map contains a QGis project and necessary shapefiles to produce the Maps in Figure 3 and Appendix Figures B.1. 

### In the folder `Preparation`:  
- `1.Preparation Commune_data` defines variables and prepare the dataset at the communal level.
- `1.Preparation Canton_data` defines variables and prepare the dataset at the cantonal level.
- `1.Preparation Departement_data` defines variables and prepare the dataset at the departemental level.
- `1.Preparation Diocese_data` defines variables and prepare the dataset at the diocese level.

### In the folder `Results`:  
The codes produces the output of the Main text and of the Online Appendix. Codes `Table1a.do` to `Table5.do` produce the Tables of the main text. Codes `Figure2.do` to `Figure8.do` produce the Figures of the main text. Codes to produce the Figures in Appendix are denominated with the letter and the number of the Appendix. Codes starting by App_Figure produce Figures in Appendix. Tables output are stored in the folder `Results/Tables`. Figures are stored in the folder `Results/Figures` both in png and pdf format.

Maps are produced from the QGis project in the `Maps` folder. 

In details, output in the main text is produced as follows. 
- `Code/Results/Table1a.do` produces the first panel of Table 1.
- `Code/Results/Table1b.do` produces the second panel of Table 1.
- `Code/Results/Table2.do` produces the Table 2.
- `Code/Results/Table3.do` produces the Table 3
- `Code/Results/Table4.do` produces the Table 4.
- `Code/Results/Table5.do` produces the Table 5.
- `Code/Results/Figure2.do` produces Figure 2.
- `Code/Results/Figure4a.do` produces Figure 4a.
- `Code/Results/Figure4b.do` produces Figure 4b.
- `Code/Results/Figure4c.do` produces Figure 4c.
- `Code/Results/Figure5a.do` produces Figure 5a.
- `Code/Results/Figure5b.do` produces the Table 5b.

In details, output in the Online Appendix is produced as follows. 
- `Code/Results/TableA1.do` produces Table A1.
- `Code/Results/TableA2a.do` produces the first panel of Table A2.
- `Code/Results/TableA2b.do` produces the second panel of Table A2.
- `Code/Results/TableA2c.do` produces the third panel of Table A2.
- `Code/Results/TableA3a.do` produces the first panel of Table A3.
- `Code/Results/TableA3b.do` produces the second panel of Table A3.
- `Code/Results/TableA3c.do` produces the third panel of Table A3.
- `Code/Results/TableA4.do` produces Table A4.
- `Code/Results/TableA5.do` produces Table A5.
- `Code/Results/TableA6.do` produces Table A6.
- `Code/Results/App_FigureB2.do` produces Figure B2.
- `Code/Results/App_FigureB3.do` produces Figure B3.


# Instructions to replicators
To produce Tables and Figures using the Stata. 
- Adjust the default paths by editing the path setting command in `Master`dofile to the path of the replication package ("XXXX" appearing in  line 10 and 11 in `Replication package/Code`).  
- Ensure that the Folders located in `Replication package/Results` are empty. 
- Run the `Replication package/CodeMaster.do`.

To produce the maps (Figure 3 in the text and Figures B1), open the QGis project `Maps`in the folder `Replication package/Maps`. You can click on the different layers to produce maps. 
- To produce Figure 3 in the main text, select the layers `DEPARTEMENTS_1919`, `Branches`, `Branches_before`and `Branches_after`. You can edit the map by `Creating a New Print Layout`in the Project Menu. 
- To produce the different Figures B1, unselect the different `Branches`, `Branches_before`and `Branches_after` layers. Then select the `Meetings`layout and then right click on the layer to select Properties, the go to Symbols. You can then use Categorize and select `Meetings_YYYY` YYYY being the year of interest. Click then on Classify, Apply and Unselect Observations with either 0 or no value. You can then produce a Map using `Creating a New Print Layout`. Repeat the operation for the different years. 

### Details

- As codes run, the folder `Data/Generated data` will contain the datasets saved from the different codes.  
- All outputs will be saved in the folders `Results/Figures` in pdf and png format and `Results/Tables` in tex format. 
# List of tables and figures
The provided code reproduces:
- All tables in the paper as well as Figures (except Maps -- Figure 3 and Figures B1). 

The Figures and Tables in the main text are obtained as follows: 

| Figure/Table #    | Program                                 | Output file                          |
|-------------------|-----------------------------------------|--------------------------------------|
| Table 1           | `Code/Results/Table1a.do`                        | `Results/Tables/Table1a.tex`     |
|                   | `Code/Results/Table1b.do`                        | `Results/Tables/Table1b.tex`     |
| Table 2           | `Code/Results/Table2.do`                         | `Results/Tables/Table2.tex`      |
| Table 3           | `Code/Results/Table3.do`                         | `Results/Tables/Table3.tex`      |
| Table 4           | `Code/Results/Table4.do`                         | `Results/Tables/Table4.tex`      |
| Table 5           | `Code/Results/Table5.do`                         | `Results/Tables/Table5.tex`      |
| Figure 2          | `Code/Results/Figure2.do`                        | `Results/Figures/Figure2.png`/pdf|
| Figure 3          |  QGIS Project    `Maps`                                 | TBD                              |
| Figure 4          | `Code/Results/Figure4a.do`                        | `Results/Figures/Figure4a.png`/pdf|
|                   | `Code/Results/Figure4b.do`                        | `Results/Figures/Figure4b.png`/pdf|
|                   | `Code/Results/Figure4c.do`                        | `Results/Figures/Figure4c.png`/pdf|
| Figure 5          | `Code/Results/Figure5a.do`                        | `Results/Figures/Figure5a.png`/pdf|
|          | `Code/Results/Figure5b.do`                        | `Results/Figures/Figure5b.png`/pdf|
| Figure 6          | `Code/Results/Figure6a.do`                        | `Results/Figures/Figure6a.png`/pdf|
|            | `Code/Results/Figure6b.do`                        | `Results/Figures/Figure6b.png`/pdf|
| Figure 7          | `Code/Results/Figure7.do`                        | `Results/Figures/Figure7.png`/pdf|
| Figure 8          | `Code/Results/Figure8.do`                        | `Results/Figures/Figure8.png`/pdf|

The Figures and Tables in the online Appendix are obtained as follows: 

| Figure/Table #    | Program                                 | Output file                          |
|-------------------|-----------------------------------------|--------------------------------------|
| Table A1          | `Code/Results/TableA1.do`                        | `Results/Tables/TableA1.tex`     |
| Table A2          | `Code/Results/TableA2a.do`                        | `Results/Tables/TableA2a.tex`     |
|            | `Code/Results/TableA2b.do`                        | `Results/Tables/TableA2b.tex`     |
|            | `Code/Results/TableA2c.do`                        | `Results/Tables/TableA2c.tex`     |
| Table A3          | `Code/Results/TableA3a.do`                        | `Results/Tables/TableA3a.tex`     |
|            | `Code/Results/TableA3b.do`                        | `Results/Tables/TableA3b.tex`     |
|            | `Code/Results/TableA3c.do`                        | `Results/Tables/TableA3c.tex`     |
| Table A4           | `Code/Results/TableA4.do`    |      `Results/Tables/TableA4.tex`  | 
| Table A5           | `Code/Results/TableA5.do`    |      `Results/Tables/TableA5.tex`  | 
| Figures B1         | QGIS Project "Maps"     |       TBD   |
| Figure B2         | `Code/Results/App_FigureB2.do`    |   `Results/Figures/FigureB2.png`/pdf    |
| Figure B3         | `Code/Results/App_FigureB3.do`    |   `Results/Figures/FigureB3.png`/pdf    |

Tables 1, A2, A3 adds the results obtained in different output in different panels. Panels are denoted a,b,c.  

# References
- Gay, V. (2021). Mapping the Third Republic: A geographic information system of France (1870–1940). Historical Methods: A Journal of Quantitative and Interdisciplinary History, 54(4), 189-207.

